package com.pig4cloud.pig.goods.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Description:
 *
 * @author fxl
 * @date Created on 2021/7/26
 */
@Configuration
public class ElasSticSearchConfigClient {

	@Bean
	public RestHighLevelClient esRestClient(){
		RestHighLevelClient client = new RestHighLevelClient(RestClient.builder(
				new HttpHost("127.0.0.1", 9200, "http")));
		return client;
	}

}
